A processing system can include multiple masters that share slaves (or peripherals). To provide a secure processing environment, the processing system often implements a security mechanism that enables each master to access resources depending on its security state. For example, a security mechanism can allow a master operating in a secure state to access secure and non-secure resources, while allowing a master operating in a non-secure state to access only non-secure resources. A master is typically unaware of its operating state, such that the master may attempt to access secure resources even when operating in a non-secure state. The security mechanism blocks such attempt and then notifies the master that an error occurred while attempting to access the secure resources. The master can then take action to resolve the error. Although existing security mechanisms have been generally adequate for their intended purposes, they have not been entirely satisfactory in all respects.